import {createBrowserRouter, Link} from 'react-router-dom'

import App from '../App'
import Home from '../pages/tab/home/Index'
import Tobo from '../pages/tab/tobo/Index'
import Message from '../pages/tab/message/Index'
import My from '../pages/tab/my/Index'
import { ErrorBlock } from 'antd-mobile'
const routes=createBrowserRouter([
    {
        path:'/',
        element:<App/>,
        children:[
            {
                path:'home',
                element:<Home/>
            },
            {
                path:'tobo',
                element:<Tobo/>
            },
            {
                path:'Message',
                element:<Message/>
            },
            {
                path:'my',
                element:<My/>
            },
            {
                path:'*',
                element:<ErrorBlock><Link to='/home'>返回首页</Link></ErrorBlock>
            }
        ]
    }
])
export default routes;